////////////////////////////////////////////////////////////////////////////////
//
//  Copyright 2010 galaxy.org
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////

package org.galaxy.richflex.events
{
	import flash.events.Event;
	
	/**
	 * Close event.
	 * 
	 * @author Cheng Liang
	 * 
	 * @version 0.0.1 create 2010-9-9
	 */
	public class RichCloseEvent extends Event
	{
		// --------------------------------------------------------------------------
		//
		// Constants
		//
		// --------------------------------------------------------------------------
		
		/**
		 * Close event type: default dispatches when a dialog closes.
		 */
		public static const CLOSE_DIALOG : String = "closeDialog";
		
		/**
		 * Close event detail. Usually caused by click close button.
		 */
		public static const CLOSE_NORMAL : String = "closeNormal";
		
		/**
		 * Close event detail. Usually caused by click yes button.
		 */
		public static const CLOSE_YES : String = "closeYes";
		
		/**
		 * Close event detail. Usually caused by click no button.
		 */
		public static const CLOSE_NO : String = "closeNo";
		
		/**
		 * Close event detail. Usually caused by click cancel button.
		 */
		public static const CLOSE_CANCEL : String = "closeCancel";
		
		// --------------------------------------------------------------------------
		//
		// Properties
		//
		// --------------------------------------------------------------------------
		
		/**
		 * Close detail information. Usually the following values:
		 * <ul>
		 * 	<li>RichCloseEvent.CLOSE_NORMAL</li>
		 * 	<li>RichCloseEvent.CLOSE_YES</li>
		 * 	<li>RichCloseEvent.CLOSE_NO</li>
		 * 	<li>RichCloseEvent.CLOSE_CANCEL</li>
		 * </ul>
		 */
		public var closeDetail : String;
		
		// --------------------------------------------------------------------------
		//
		// Constructor
		//
		// --------------------------------------------------------------------------
		
		public function RichCloseEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
		}
	}
}